﻿@model enqueteJwVd.Survey

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Survey ID:  @Html.DisplayFor(model => model.Id)</legend>

        @Html.HiddenFor(model => model.State)
          @Html.HiddenFor(model => model.ActivationDate)
            @Html.HiddenFor(model => model.EndDate)
              @Html.HiddenFor(model => model.Anonymous)

        
        <table>
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Title)
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.Title)
                        @Html.ValidationMessageFor(model => model.Title)
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Description)
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.Description)
                        @Html.ValidationMessageFor(model => model.Description)
                    </div>
                </td>
            </tr>
            @*
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.State)
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.State)
                        @Html.ValidationMessageFor(model => model.State)
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.ActivationDate)
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.ActivationDate)
                        @Html.ValidationMessageFor(model => model.ActivationDate)
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.EndDate)
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.EndDate)
                        @Html.ValidationMessageFor(model => model.EndDate)
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Anonymous)
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.Anonymous)
                        @Html.ValidationMessageFor(model => model.Anonymous)
                    </div>
                </td>
            </tr>
            *@
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.EndText)
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.EndText)
                        @Html.ValidationMessageFor(model => model.EndText)
                    </div>
                </td>
            </tr>
        </table>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>


